package com.miaoxie.forum.module.designPatterns.singleton;

/**
 * Created by miaoxie on 2017/6/6.
 */
public class Singleton {
    private static Singleton singleton = null;

    private Singleton(){}
    public static Singleton getSingleton(){
        if(singleton == null){
            synchronized (singleton){
                singleton=new Singleton();
            }
        }
        return singleton;
    }

}
